extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板
		li
			i.icon-angle-right
		li
			a(href="/messages") 消息

	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 消息
			div.box-content
				- var action = "/messages/multicast?game=" + game
				form(class="form-horizontal", action="#{action}", method="post")
					fieldset
						div.control-group
							label(class="control-label", for="title") 标题
							div.controls
								input(class="input-xlarge focused", id="title", name="title", type="text", value="#{message.get('title')}")
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="content") 内容
							div.controls
								textarea(class="input-xxlarge focused", name="content", cols='50', rows='10') #{message.get('content')}
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="attach_category") 附件
							div.controls
								select(id="attach_category", name="attach_category")
									option(selected=message.get('attach_category') == 'none', value='none') 无附件
									option(selected=message.get('attach_category') == 'diamond', value='diamond') 钻石
									option(selected=message.get('attach_category') == 'gold', value='gold') 金币
									option(selected=message.get('attach_category') == 'metal', value='metal') 勋章
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="attach_quantity") 附件数量
							div.controls
								input(class="input-xlarge focused", id="attach_quantity", name="attach_quantity", type="number", value="#{message.get('attach_quantity')}")
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="offset") 起始
							div.controls
								input(class="input-xlarge focused", id="offset", name="offset", type="number", value="#{message.get('offset')}")
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="limit") 人数
							div.controls
								input(class="input-xlarge focused", id="limit", name="limit", type="number", value="#{message.get('limit')}")
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="name") 玩家名字
							div.controls
								input(class="input-xlarge focused", id="name", name="name", type="name", value="")
								<p class="help-block"></p>

						div.form-actions
							button(type="submit", class="btn btn-primary") 发送
							button.btn 
								a(href="/messages") 取消
